package com.core.config;

import org.springframework.boot.CommandLineRunner;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Author: 孙常胜
 * @CreateTime: 2021/7/21 15:01
 * @Description:
 */
@Component
public class ClientStart implements CommandLineRunner {
    @Resource
    private Client client;
    @Override
    @Async
    public void run(String... args) throws Exception {
        client.connectServer();
    }
}
